home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
tasks.arc
/
TEST.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1990-07-31
|
921b
|
54 lines
program test;
uses crt, tasks;
var
i,j : longint;
er : byte;
tn : byte;
{$F+}
procedure proc_one(schedule : longint);
begin
writeln('proc one');
end;
procedure proc_two(schedule : longint);
begin
writeln('proc two');
end;
{$F-}
begin
er := add_task(10, @proc_one,tn);
er := add_task(20, @proc_two,tn);
set_criteria(task_criteria_mod);
for i := 1 to 30 do begin
writeln('Scheduling number ',i:2);
er := run_tasks(i);
writeln('Error number ', er:2);
end;
writeln('We change to equal to scheduling. Hit any key');
repeat until keypressed;
set_criteria(task_criteria_equal);
for i := 1 to 20 do begin
if odd(i)
then j := 10
else j := 20;
er := run_tasks(j);
end;
writeln('Change criteria to greater then');
repeat until keypressed;
set_criteria(task_criteria_more);
for i := 1 to 22 do
er := run_tasks(i);
end.